package cn.shyouchi.wuguanjia.android.ui.patrol.begin;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by Eenie on 2016/12/28 at 9:49
 * Email: 472279981@qq.com
 * Des:
 */

public class PatrolRingDesEntity {

    /**
     * resultCode : 0
     * resultMessage : [{"id":38,"info":[{"id":42,"inspectionname":"地下室","inspectionmethod":2,"inspectiontime":"18:26:00","inspectioncontent":"1.门锁是否完好。","image":[],"inspection":{}},{"id":40,"inspectionname":"大堂","inspectionmethod":2,"inspectiontime":"16:50:00","inspectioncontent":"1.卫生","image":[],"inspection":{}},{"id":46,"inspectionname":"地铁","inspectionmethod":2,"inspectiontime":"16:50:00","inspectioncontent":"呜呜呜呜呜呜","image":[],"inspection":{}}]}]
     */

    private int resultCode;
    private List<ResultMessageBean> resultMessage;

    public int getResultCode() {
        return resultCode;
    }

    public void setResultCode(int resultCode) {
        this.resultCode = resultCode;
    }

    public List<ResultMessageBean> getResultMessage() {
        return resultMessage;
    }

    public void setResultMessage(List<ResultMessageBean> resultMessage) {
        this.resultMessage = resultMessage;
    }

    public static class ResultMessageBean implements Parcelable {
        /**
         * id : 38
         * info : [{"id":42,"inspectionname":"地下室","inspectionmethod":2,"inspectiontime":"18:26:00","inspectioncontent":"1.门锁是否完好。","image":[],"inspection":{}},{"id":40,"inspectionname":"大堂","inspectionmethod":2,"inspectiontime":"16:50:00","inspectioncontent":"1.卫生","image":[],"inspection":{}},{"id":46,"inspectionname":"地铁","inspectionmethod":2,"inspectiontime":"16:50:00","inspectioncontent":"呜呜呜呜呜呜","image":[],"inspection":{}}]
         */

        private int id;
        private List<InfoBean> info;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public List<InfoBean> getInfo() {
            return info;
        }

        public void setInfo(List<InfoBean> info) {
            this.info = info;
        }

        public static class InfoBean implements Parcelable {
            /**
             * id : 42
             * inspectionname : 地下室
             * inspectionmethod : 2
             * inspectiontime : 18:26:00
             * inspectioncontent : 1.门锁是否完好。
             * image : []
             * inspection : {}
             */

            private int id;
            private String inspectionname;
            private int inspectionmethod;
            private String inspectiontime;
            private String inspectioncontent;
            private InspectionBean inspection;
            private List<String> image;

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getInspectionname() {
                return inspectionname;
            }

            public void setInspectionname(String inspectionname) {
                this.inspectionname = inspectionname;
            }

            public int getInspectionmethod() {
                return inspectionmethod;
            }

            public void setInspectionmethod(int inspectionmethod) {
                this.inspectionmethod = inspectionmethod;
            }

            public String getInspectiontime() {
                return inspectiontime;
            }

            public void setInspectiontime(String inspectiontime) {
                this.inspectiontime = inspectiontime;
            }

            public String getInspectioncontent() {
                return inspectioncontent;
            }

            public void setInspectioncontent(String inspectioncontent) {
                this.inspectioncontent = inspectioncontent;
            }

            public InspectionBean getInspection() {
                return inspection;
            }

            public void setInspection(InspectionBean inspection) {
                this.inspection = inspection;
            }

            public List<String> getImage() {
                return image;
            }

            public void setImage(List<String> image) {
                this.image = image;
            }

            public static class InspectionBean implements Parcelable {


                /**
                 * id : 112
                 * situation : 0
                 * completed : 1
                 * image : [{"image":"/images/inspection/20170222/20170222111846YC2046864367.jpg"}]
                 * time : 11:18
                 * time_type : 2
                 * warranty : {"id":79,"title":"异常内容","content":"异常标题","uniqueid":"YC201702221118462172","image":[{"image":"/images/inspection/20170222/20170222111846YC2093987395.jpg"},{"image":"/images/inspection/20170222/20170222111846YC1845088661.jpg"}]}
                 */

                private int id;
                private int situation;
                private int completed;
                private String time;
                private int time_type;
                private WarrantyBean warranty;
                private List<String> image;

                public int getId() {
                    return id;
                }

                public void setId(int id) {
                    this.id = id;
                }

                public int getSituation() {
                    return situation;
                }

                public void setSituation(int situation) {
                    this.situation = situation;
                }

                public int getCompleted() {
                    return completed;
                }

                public void setCompleted(int completed) {
                    this.completed = completed;
                }

                public String getTime() {
                    return time;
                }

                public void setTime(String time) {
                    this.time = time;
                }

                public int getTime_type() {
                    return time_type;
                }

                public void setTime_type(int time_type) {
                    this.time_type = time_type;
                }

                public WarrantyBean getWarranty() {
                    return warranty;
                }

                public void setWarranty(WarrantyBean warranty) {
                    this.warranty = warranty;
                }

                public List<String> getImage() {
                    return image;
                }

                public void setImage(List<String> image) {
                    this.image = image;
                }

                public static class WarrantyBean implements Parcelable {
                    /**
                     * id : 79
                     * title : 异常内容
                     * content : 异常标题
                     * uniqueid : YC201702221118462172
                     * image : [{"image":"/images/inspection/20170222/20170222111846YC2093987395.jpg"},{"image":"/images/inspection/20170222/20170222111846YC1845088661.jpg"}]
                     */

                    private int id;
                    private String title;
                    private String content;
                    private String uniqueid;
                    private List<String> image;

                    public int getId() {
                        return id;
                    }

                    public void setId(int id) {
                        this.id = id;
                    }

                    public String getTitle() {
                        return title;
                    }

                    public void setTitle(String title) {
                        this.title = title;
                    }

                    public String getContent() {
                        return content;
                    }

                    public void setContent(String content) {
                        this.content = content;
                    }

                    public String getUniqueid() {
                        return uniqueid;
                    }

                    public void setUniqueid(String uniqueid) {
                        this.uniqueid = uniqueid;
                    }

                    public List<String> getImage() {
                        return image;
                    }

                    public void setImage(List<String> image) {
                        this.image = image;
                    }

                    @Override
                    public int describeContents() {
                        return 0;
                    }

                    @Override
                    public void writeToParcel(Parcel dest, int flags) {
                        dest.writeInt(this.id);
                        dest.writeString(this.title);
                        dest.writeString(this.content);
                        dest.writeString(this.uniqueid);
                        dest.writeStringList(this.image);
                    }

                    public WarrantyBean() {
                    }

                    protected WarrantyBean(Parcel in) {
                        this.id = in.readInt();
                        this.title = in.readString();
                        this.content = in.readString();
                        this.uniqueid = in.readString();
                        this.image = in.createStringArrayList();
                    }

                    public static final Creator<WarrantyBean> CREATOR = new Creator<WarrantyBean>() {
                        @Override
                        public WarrantyBean createFromParcel(Parcel source) {
                            return new WarrantyBean(source);
                        }

                        @Override
                        public WarrantyBean[] newArray(int size) {
                            return new WarrantyBean[size];
                        }
                    };
                }


                @Override
                public int describeContents() {
                    return 0;
                }

                @Override
                public void writeToParcel(Parcel dest, int flags) {
                    dest.writeInt(this.id);
                    dest.writeInt(this.situation);
                    dest.writeInt(this.completed);
                    dest.writeString(this.time);
                    dest.writeInt(this.time_type);
                    dest.writeParcelable(this.warranty, flags);
                    dest.writeStringList(this.image);
                }

                public InspectionBean() {
                }

                protected InspectionBean(Parcel in) {
                    this.id = in.readInt();
                    this.situation = in.readInt();
                    this.completed = in.readInt();
                    this.time = in.readString();
                    this.time_type = in.readInt();
                    this.warranty = in.readParcelable(WarrantyBean.class.getClassLoader());
                    this.image = in.createStringArrayList();
                }

                public static final Creator<InspectionBean> CREATOR = new Creator<InspectionBean>() {
                    @Override
                    public InspectionBean createFromParcel(Parcel source) {
                        return new InspectionBean(source);
                    }

                    @Override
                    public InspectionBean[] newArray(int size) {
                        return new InspectionBean[size];
                    }
                };
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeInt(this.id);
                dest.writeString(this.inspectionname);
                dest.writeInt(this.inspectionmethod);
                dest.writeString(this.inspectiontime);
                dest.writeString(this.inspectioncontent);
                dest.writeParcelable(this.inspection, flags);
                dest.writeStringList(this.image);
            }

            public InfoBean() {
            }

            protected InfoBean(Parcel in) {
                this.id = in.readInt();
                this.inspectionname = in.readString();
                this.inspectionmethod = in.readInt();
                this.inspectiontime = in.readString();
                this.inspectioncontent = in.readString();
                this.inspection = in.readParcelable(InspectionBean.class.getClassLoader());
                this.image = in.createStringArrayList();
            }

            public static final Parcelable.Creator<InfoBean> CREATOR = new Parcelable.Creator<InfoBean>() {
                @Override
                public InfoBean createFromParcel(Parcel source) {
                    return new InfoBean(source);
                }

                @Override
                public InfoBean[] newArray(int size) {
                    return new InfoBean[size];
                }
            };
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.id);
            dest.writeTypedList(this.info);
        }

        public ResultMessageBean() {
        }

        protected ResultMessageBean(Parcel in) {
            this.id = in.readInt();
            this.info = in.createTypedArrayList(InfoBean.CREATOR);
        }

        public static final Parcelable.Creator<ResultMessageBean> CREATOR = new Parcelable.Creator<ResultMessageBean>() {
            @Override
            public ResultMessageBean createFromParcel(Parcel source) {
                return new ResultMessageBean(source);
            }

            @Override
            public ResultMessageBean[] newArray(int size) {
                return new ResultMessageBean[size];
            }
        };
    }
}
